<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:icecore="http://www.icefaces.org/icefaces/core"
	xmlns:ace="http://www.icefaces.org/icefaces/components"
	xmlns:ice="http://www.icesoft.com/icefaces/component">
<h:head>
	<ice:outputStyle href="#{baseMBean.securedOutPutStyleURL}"></ice:outputStyle>
</h:head>
<h:body class="#{baseMBean.securedOutPutBodyClass}">
	<f:loadBundle
		basename="com/avecsys/quotemanager/resources/messages_buyer"
		var="msgs"></f:loadBundle>
	<f:loadBundle
		basename="com/avecsys/quotemanager/resources/messages_common"
		var="msgs_common"></f:loadBundle>
	<c:if test="${baseMBean.menuBarEnabled == 'true'}">
		<h:form id="menuBarForm">
			<icecore:singleSubmit />
			<ice:menuBar styleClass="menuBar">
		        <ice:menuItems value="#{menuBarMBean.menuModel}"/>
		    </ice:menuBar>
	    </h:form>		
	</c:if>
	<h:form id="form">
		<f:event listener="#{loginMBean.isUserSignedIn}" type="preRenderView"></f:event>
		<f:event listener="#{buyerMasterListMBean.init}" type="preRenderView"></f:event>
		<div class="page-container">
			<div class="pageHeader">
				<ice:panelGrid columns="2">
					<ice:graphicImage
						url="#{buyerMasterListMBean.getImageResourceURL('PAGE_HEADER_ICON_BUYER_INQUIRY')}"></ice:graphicImage>
					<ice:outputLabel value="#{msgs.BUYER_INQUIRY_HEADER_SECTION_TITLE}"
						styleClass="pageHeaderTitleText"></ice:outputLabel>
				</ice:panelGrid>
			</div>
			<center>
				<ace:dataTable id="buyerMasterTableId1"
					value="#{buyerMasterListMBean.buyerMasterPojoList}"
					emptyMessage="#{msgs_common.DATATABLE_EMPTY_MESSAGE}"
					var="buyerMaster" paginator="true" paginatorPosition="bottom">
					<ace:column id="companyNameId" styleClass="tr1"
						sortBy="#{buyerMaster.companyMasterPojo.companyName}"
						filterBy="#{buyerMaster.companyMasterPojo.companyName}"
						filterMatchMode="contains">
						<f:facet name="header">
							<ice:outputText value="#{msgs.BUYER_LIST_HEADER_COMPANY_NAME}"
								styleClass="tdheader" />
						</f:facet>
						<ice:outputText
							value="#{buyerMaster.companyMasterPojo.companyName}" />
					</ace:column>
					<ace:column id="addressLine1Id" styleClass="tr1"
						sortBy="#{buyerMaster.companyMasterPojo.addressLine1}"
						filterBy="#{buyerMaster.companyMasterPojo.addressLine1}"
						filterMatchMode="contains">
						<f:facet name="header">
							<ice:outputText value="#{msgs.BUYER_LIST_HEADER_ADDRESS_LINE1}"
								styleClass="tdheader" />
						</f:facet>
						<ice:outputText
							value="#{buyerMaster.companyMasterPojo.addressLine1}" />
					</ace:column>
					<ace:column id="addressLine2Id" styleClass="tr1"
						sortBy="#{buyerMaster.companyMasterPojo.addressLine2}"
						filterBy="#{buyerMaster.companyMasterPojo.addressLine2}"
						filterMatchMode="contains">
						<f:facet name="header">
							<ice:outputText value="#{msgs.BUYER_LIST_HEADER_ADDRESS_LINE2}"
								styleClass="tdheader" />
						</f:facet>
						<ice:outputText
							value="#{buyerMaster.companyMasterPojo.addressLine2}" />
					</ace:column>
					<ace:column id="cityId" styleClass="tr1"
						sortBy="#{buyerMaster.companyMasterPojo.city}"
						filterBy="#{buyerMaster.companyMasterPojo.city}"
						filterMatchMode="contains">
						<f:facet name="header">
							<ice:outputText value="#{msgs.BUYER_LIST_HEADER_CITY}"
								styleClass="tdheader" />
						</f:facet>
						<ice:outputText value="#{buyerMaster.companyMasterPojo.city}" />
					</ace:column>
					<ace:column id="countryId" styleClass="tr1"
						sortBy="#{buyerMaster.companyMasterPojo.countryMasterPojo.longDesc}"
						filterBy="#{buyerMaster.companyMasterPojo.countryMasterPojo.longDesc}"
						filterMatchMode="contains">
						<f:facet name="header">
							<ice:outputText value="#{msgs.BUYER_LIST_HEADER_COUNTRY}"
								styleClass="tdheader" />
						</f:facet>
						<ice:outputText
							value="#{buyerMaster.companyMasterPojo.countryMasterPojo.longDesc}" />
					</ace:column>
					<ace:column id="edit" styleClass="tr1">
						<f:facet name="header">
							<ice:outputText value="#{commonMsgs.TABLE_HEADER_ACTION}"
								styleClass="tdheader" />
						</f:facet>
						<ice:commandLink action="#{buyerMasterListMBean.editBuyerMaster}">
							<f:param value="#{buyerMaster.buyerId}" name="buyerId"
								id="editBuyerId" />
							<ice:graphicImage
								url="#{buyerMasterListMBean.getImageResourceURL('IMG_EDIT_ICON')}"
								title="#{buyerMsgs.TOOLTIP_ACTION_EDIT_BUYER}"
								style="border-left:0px;border-right:0px;border-top:0px;border-bottom:0px" />
						</ice:commandLink>
						<ice:commandLink
							actionListener="#{buyerMasterListMBean.confirmDeleteAction}">
							<f:param value="#{buyerMaster.buyerId}" name="buyerId" />
							<f:param value="#{buyerMaster.companyMasterPojo.companyName}"
								name="companyName" />
							<ice:graphicImage
								url="#{buyerMasterListMBean.getImageResourceURL('IMG_DELETE_ICON')}"
								title="#{buyerMsgs.TOOLTIP_ACTION_DELETE_BUYER}"
								style="border-left:0px;border-right:0px;border-top:0px;border-bottom:0px" />
						</ice:commandLink>
					</ace:column>
				</ace:dataTable>
				<ice:message for="messageBoardId" styleClass="iceMsgInfo"></ice:message>
			</center>
		</div>
		<ace:confirmationDialog id="messageDialog"
			widgetVar="#{buyerMasterListMBean.messageDialog.dialogWidgetVar}"
			message="#{buyerMasterListMBean.messageDialog.message}"
			header="Confirmation" width="400" height="180" closable="true"
			position="center" modal="true">
			<center>
				<ice:panelGrid columns="2">
					<h:commandButton id="yes" value="Yes"
						actionListener="#{buyerMasterListMBean.actionDeleteBuyerMaster}"
						styleClass="small color green button">
					</h:commandButton>
					<h:commandButton id="no" value="No"
						actionListener="#{buyerMasterListMBean.messageDialog.hideDialog}"
						styleClass="small color green button" />
					<ice:inputHidden name="requestJSON"
						value="#{buyerMasterListMBean.messageDialog.requestJSON}"></ice:inputHidden>
				</ice:panelGrid>
			</center>
		</ace:confirmationDialog>
		<br />
		<ui:include src="/assets/pages/core/messageBoard.xhtml"></ui:include>
	</h:form>
</h:body>
</html>
